<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bad Sectors</title>
</head>

<body>
<pre>
<code>
<?php
include_once("../../resources/api/class.badsectors.php");
$html = file_get_contents(urldecode("%ea%b5%ad%ed%99%94%ea%b3%bc.html"));
$enc = mb_detect_encoding($html);


#print $html;
$bs = new BadSectors($html, $enc);
#print_r($bs->isSafe(2000));
#print_r($bs->sectors);
foreach($bs->sectors as $value) {
	print_r($value);
	print "::" . substr($html, $value["start"], $value["end"] - $value["start"] + 1) . "::\r\n";
	if ($i++ == 100) exit();
}
?>
</code>
</body>
</html>